{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    {:token_field()}
    <div class="layui-form-item">
        <label class="layui-form-label">菜单</label>
        <div class="layui-input-block">
            <input type="radio" name="row[ismenu]" value="1" title="是" checked lay-filter="ismenu">
            <input type="radio" name="row[ismenu]" value="0" title="否" lay-filter="ismenu">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">上级菜单</label>
        <div class="layui-input-block">
            <select name="row[parentid]" lay-verify="required">
                <option value="0">作为一级菜单</option>
                {$select_categorys|raw}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">规则</label>
        <div class="layui-input-block">
            <input type="text" name="row[name]" lay-verify="required" autocomplete="off"  data-placeholder-node="控制器/方法名,如果有目录请使用 目录名.控制器名/方法名" data-placeholder-menu="父级菜单无需匹配控制器和方法,子级菜单请使用控制器名" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">标题</label>
        <div class="layui-input-block">
            <input type="text" name="row[title]" lay-verify="required" autocomplete="off" placeholder="标题" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item" data-type="menu">
        <label class="layui-form-label">URL</label>
        <div class="layui-input-block">
            <input type="text" name="row[url]" autocomplete="off" placeholder="一般情况下留空即可,如果是外部链接或相对链接请输入" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <div class="layui-input-block">
            <input type="text" id="iconPicker" lay-filter="iconPicker" class="layui-hide" name="row[icon]" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">规则条件</label>
        <div class="layui-input-block">
            <textarea name="row[condition]" placeholder="规则条件" class="layui-textarea"></textarea>
        </div>
    </div>
    </div>
    <div class="layui-form-item" data-type="menu">
        <label class="layui-form-label">菜单类型</label>
        <div class="layui-input-block">
            <input type="radio" name="row[menutype]" value="_iframe" title="选项卡(默认)" checked>
            <input type="radio" name="row[menutype]" value="_blank" title="链接">
        </div>
    </div>
    <div class="layui-form-item" data-type="menu">
        <label class="layui-form-label">扩展属性</label>
        <div class="layui-input-block">
            <textarea name="row[extend]" placeholder="扩展属性" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea name="row[remark]" placeholder="备注" class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">显示排序</label>
        <div class="layui-input-block">
            <input type="text" name="row[listorder]" autocomplete="off" placeholder="显示排序" class="layui-input" value="0">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否显示</label>
        <div class="layui-input-block">
            <input type="radio" name="row[status]" value="1" title="显示" checked>
            <input type="radio" name="row[status]" value="0" title="隐藏">
        </div>
    </div>
    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn disabled" lay-submit>立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}